/*Copyright 2014 Rajesh Putta http://www.codesnippets4all.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
* 
*/

package com.codesnippets4all.jthunder.core.framework;

import java.util.Map;

import com.codesnippets4all.jthunder.core.config.handlers.AutomationConfig;
import com.codesnippets4all.jthunder.core.config.handlers.LifeCycleConfig;
import com.codesnippets4all.jthunder.core.config.handlers.PhaseConfig;
import com.codesnippets4all.jthunder.core.config.handlers.TaskConfig;
import com.codesnippets4all.jthunder.core.execution.status.AutomationStatusManager;
import com.codesnippets4all.jthunder.core.framework.hierarchy.IHierarchy;
import com.codesnippets4all.jthunder.core.framework.hierarchy.Node;
import com.codesnippets4all.jthunder.core.framework.hierarchy.PhaseHierarchy;
import com.codesnippets4all.jthunder.core.framework.hierarchy.PhaseHierarchyManager;
import com.codesnippets4all.jthunder.core.framework.hierarchy.TaskHierarchy;

/*
 * @author Rajesh Putta
 */
public interface IFramework {
	
	public void initialize(String configFilePath);

	public AutomationConfig getAutomationConfig();
	public LifeCycleConfig getLifeCycleConfig(String lifeCycleName);

	public Map<String,PhaseConfig> getPhaseConfigMap(String lifeCycleName);
	
	public PhaseConfig getPhaseConfig(String lifeCycleName, String phaseName);
	
	public TaskConfig getTaskConfig(String lifeCycleName, String phaseName, String taskName);	

	public PhaseHierarchyManager getPhaseHierarchyManager(String lifeCycleName);
	
	public PhaseHierarchy getPhaseHierarchy(String lifeCycleName);	
	
	public void displayPhaseHierarchy(String lifeCycleName);

	public Map<String, IHierarchy<TaskConfig, Node>> getTaskHierarchyMap(String lifeCycleName);
	
	public TaskHierarchy getTaskHierarchy(String lifeCycleName, String phaseName);
	
	public void displayTaskHierarchy(String lifeCycleName, String phaseName);

	public void execute();
	public void executeLifeCycle(String lifeCycleName);
	
	public AutomationStatusManager getStatusManager(String lifeCycleName);
	public Map<String, AutomationStatusManager> getTaskStatusManagerMap();
	
	public void destroy();

}
